package com.rchik.divermate;

public class MetricType {
	
	private int imageResourceId;
	private int logResourceId;
	private float ratio;
	
	public MetricType(int imageResourceId, float ratio, int logResourceId)
	{
		this.imageResourceId = imageResourceId;
		this.ratio = ratio;
		this.logResourceId = logResourceId;
	}
	
	public void setImageResourceId(int imageResourceId) {
		this.imageResourceId = imageResourceId;
	}
	
	public int getImageResourceId() {
		return imageResourceId;
	}
	
	public void setRatio(float ratio) {
		this.ratio = ratio;
	}
	
	public float getRatio() {
		return ratio;
	}
	
	public int getAppropriateValueForCurrentType(float value)
	{
		return Math.round(value/ratio);
	}

	public void setLogResourceId(int logResourceId) {
		this.logResourceId = logResourceId;
	}

	public int getLogResourceId() {
		return logResourceId;
	}
}
